package com.asiainfo.bms.util;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回码枚举类
 *
 * @author liu.hx
 */
@Getter
@AllArgsConstructor
public enum ResultCodeEnum {
    /**
     * 偏不写注释
     */
    SUCCESS(true, 20000, "成功"),

    UNKNOWN_REASON(false, 20001, "未知错误"),
    BAD_SQL_GRAMMAR(false, 21002, "SQL语法错误"),
    DUPLICATE_KEY_EXCEPTION(false, 21003, "主键重复错误"),
    JSON_PARSE_ERROR(false, 21004, "JSON解析异常"),
    PARAM_ERROR(false, 21005, "参数不正确"),
    FILE_UPLOAD_ERROR(false, 21006, "文件上传错误"),
    FILE_DELETE_ERROR(false, 21007, "文件删除错误"),
    EXCEL_DATA_IMPORT_ERROR(false, 21008, "Excel数据导入错误");

    private final Boolean success;

    private final Integer code;

    private final String message;

}
